﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>搜索连接组装代码</title>
</head>

<body>
<script language="javascript">
 function search()
 {
// alert('hi');
// alert('hi2');

//  alert(key.value);
// window.location.href='http://baidu.com';
string=document.getElementById("key").value;
alert(string);
url='http://www.baidu.com/s?wd='
url+=string;
window.open(url);
 } 
</script>
<form id="form">
  <input type="text" name="q" id="key"/>
  <input type="button" name="submit" value="搜"   onclick="search()"/>
</form>
</body>
</html>
